package com.cloud.tsp.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.api.annotation.TransUser;
import com.cloud.api.domain.tsp.QueryStatute;
import com.cloud.api.domain.tsp.Statute;
import com.cloud.mybatis.domain.TableDataInfo;
import com.cloud.tsp.mapper.StatuteMapper;
import com.cloud.tsp.service.IStatuteService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-22
 */
@Service("statuteService")
public class StatuteServiceImpl extends ServiceImpl<StatuteMapper, Statute> implements IStatuteService {

    @Resource
    private StatuteMapper statuteMapper;

    @Override
    @TransUser
    public TableDataInfo<Statute> selectStatuteList(QueryStatute para) {
        Page<Statute> page = new Page<>();
        page.setCurrent(para.getPage());
        page.setSize(para.getPageSize());
        IPage<Statute> data = statuteMapper.selectStatuteList(page, para);
        return TableDataInfo.build(data);
    }
}